import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import './cooperationsinvite.css'
import { AtCheckbox,AtButton,AtIcon} from 'taro-ui'
import { $redirectTo } from '../../../global';
import reactMixin from 'react-mixin';
import myJs from '../../pages/cooperationsinvite/cooperationsinvitejs.js'
import app from '../../../main.js'

export default class CooperationsInvite extends Component {
    
  config = {                 
    navigationBarTitleText: '邀请共同协作'
  }
  constructor () { 
        super(...arguments); 
        this.state = this.getData(); 
    }
  constructor () {
    super(...arguments)
    this.state = {
      checkedList: ['list1']
    }
    this.checkboxOption = [{
        value: 'list1',
        label: '众生眼科云学院助教',
        desc: '刘希 眼科'
      },{
        value: 'list2',
        label: '众生骨科云学院主任',
        desc: '陈玉轩 骨科'
      },{
        value: 'list3',
        label: '众生皮肤云学院医师',
        desc: '玉旺行 皮肤'
      },{
        value: 'list4',
        label: '众生眼科云学院助教',
        desc: '宗丽萍 眼科'
    }]
  }

  handleChange (value) {
    this.setState({
      checkedList: value
    })
  }

  componentWillMount () { }

  componentDidMount () { }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }

  chakanbingli=()=>{
    app.redirectTo('../../patientlables/pages/cooperations/cooperations');
  }

  render () {
    return (
      <View id='cooperations-invite'>
        <AtCheckbox
        options={this.checkboxOption}
        selectedList={this.state.checkedList}
        onChange={this.handleChange.bind(this)}
      />
        <View className='btn'>
                <AtButton type='primary' size='normal' className='btn-son' onClick={this.chakanbingli}><AtIcon value='check-circle' size='30' color='white' className="btn-icon"></AtIcon>确定邀请成员
                </AtButton>
                </View>
        
      </View>
    )
  }
}
reactMixin.onClass(CooperationsInvite,myJs);
